﻿{% extends "layout/base.html" %}
{% block content %}

<h1>Messages envoyés</h1>

<div id="btn_messages">
	<a class="btn_message_received" title="Messages reçus - Fac by car - Co-voiturage UMLV" href="/messages/">Messages reçus</a>
	<a class="btn_message_new" title="Nouveau message - Fac by car - Co-voiturage UMLV" href="/send_message/">Nouveau message</a>
</div>

{% for message in messages %}

	<div class="message mess_read">
		<a class="subject_mess" href="/read_message/?id={{ message.id }}"> {{message.subject}}</a> <a class="suppr_mess" title="Supprimer le message" href="/delete_message/?id={{ message.id }}"></a>
		<p><span>Envoyé à</span> <a href="/user_profile/?u={{ message.recipient.id }}">{{message.recipient}}</a> <span>le</span> {{message.date}}</p>
	</div>
	
{% endfor %}

{% endblock content %}